<?php 

//$proto = "http" .
//    ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://";
//$server = isset($_SERVER['HTTP_HOST']) ?
//    $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
//$base_url    = $proto . $server.'/';
if($_SERVER['SERVER_PORT'] == '443'){
    $base_url    = 'https://' . $_SERVER['SERVER_NAME'].'/';
}else{
    $base_url    = 'http://' . $_SERVER['SERVER_NAME'].'/';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <base href="<?php echo $base_url; ?>" />
    <style>
        .cmdb{width:200px;height:40px;margin:100px auto;}
        .cmdb a{display:block;width:90px;height:30px;line-height:30px;margin:5px;padding:0;float:left;text-align:center;text-decoration:none;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background:#666;color:#fff;}
        .cmdb a:hover{background:#333;}
    </style>
    <title>CMDB</title>
</head>
<body>
    <div class="cmdb">
        <a href="/auth">CMDB</a>
        <a href="/it/auth">CMDB IT</a>
    </div>

</body>
</html>